#pragma once

#include "MyRefPtr.h"

namespace my
{
	struct WindowEventHandlers
	{
		std::function<void()> OnCreate;
		std::function<void()> OnDestroy;
		std::function<void(int, int)> OnMoved;
		std::function<void(int, int)> OnResized;
	};


	class Win32Window : public Ref
	{
	public:
		Win32Window();
		virtual ~Win32Window();

		HWND get_handle() const { return m_hWnd; }
		WindowEventHandlers &get_event_handlers() { return m_handlers; }
		const WindowEventHandlers &get_event_handlers() const { return m_handlers; }

		void Create(int width, int height);
		void Destroy();

	private:
		HWND m_hWnd;
		WindowEventHandlers m_handlers;
	};
}
